Optimal. Leaf size=441 \[ -\frac {2 \left (60 a^3 b B+36 a b^3 B-15 a^4 (A-C)+18 a^2 b^2 (5 A+3 C)+b^4 (9 A+7 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{15 d}+\frac {2 \left (21 a^4 B+42 a^2 b^2 B+5 b^4 B+28 a^3 b (3 A+C)+4 a b^3 (7 A+5 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 \left (1098 a^3 b B+756 a b^3 B+192 a^4 C+21 b^4 (9 A+7 C)+7 a^2 b^2 (261 A+155 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{315 d}+\frac {2 b \left (261 a^2 b B+75 b^3 B+64 a^3 C+2 a b^2 (147 A+101 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d}+\frac {2 \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{315 d}+\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.83, antiderivative size = 441, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {4181, 4161,
4132, 3856, 2720, 4131, 2719} \begin {gather*} \frac {2 \sin (c+d x) \sqrt {\sec (c+d x)} \left (48 a^2 C+117 a b B+63 A b^2+49 b^2 C\right ) (a+b \sec (c+d x))^2}{315 d}+\frac {2 b \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x) \left (64 a^3 C+261 a^2 b B+2 a b^2 (147 A+101 C)+75 b^3 B\right )}{315 d}+\frac {2 \sin (c+d x) \sqrt {\sec (c+d x)} \left (192 a^4 C+1098 a^3 b B+7 a^2 b^2 (261 A+155 C)+756 a b^3 B+21 b^4 (9 A+7 C)\right )}{315 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (21 a^4 B+28 a^3 b (3 A+C)+42 a^2 b^2 B+4 a b^3 (7 A+5 C)+5 b^4 B\right )}{21 d}-\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (-15 a^4 (A-C)+60 a^3 b B+18 a^2 b^2 (5 A+3 C)+36 a b^3 B+b^4 (9 A+7 C)\right )}{15 d}+\frac {2 (8 a C+9 b B) \sin (c+d x) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3}{63 d}+\frac {2 C \sin (c+d x) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3856
Rule 4131
Rule 4132
Rule 4161
Rule 4181
Rubi steps
\begin {align*} \int \frac {(a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx &=\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}+\frac {2}{9} \int \frac {(a+b \sec (c+d x))^3 \left (\frac {1}{2} a (9 A-C)+\frac {1}{2} (9 A b+9 a B+7 b C) \sec (c+d x)+\frac {1}{2} (9 b B+8 a C) \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}+\frac {4}{63} \int \frac {(a+b \sec (c+d x))^2 \left (\frac {3}{4} a (21 a A-3 b B-5 a C)+\frac {1}{4} \left (126 a A b+63 a^2 B+45 b^2 B+82 a b C\right ) \sec (c+d x)+\frac {1}{4} \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{315 d}+\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}+\frac {8}{315} \int \frac {(a+b \sec (c+d x)) \left (-\frac {1}{8} a \left (162 a b B-3 a^2 (105 A-41 C)+7 b^2 (9 A+7 C)\right )+\frac {1}{8} \left (315 a^3 B+531 a b^2 B+21 b^3 (9 A+7 C)+a^2 b (945 A+479 C)\right ) \sec (c+d x)+\frac {3}{8} \left (261 a^2 b B+75 b^3 B+64 a^3 C+2 a b^2 (147 A+101 C)\right ) \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 b \left (261 a^2 b B+75 b^3 B+64 a^3 C+2 a b^2 (147 A+101 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d}+\frac {2 \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{315 d}+\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}+\frac {16}{945} \int \frac {-\frac {3}{16} a^2 \left (162 a b B-a^2 (315 A-123 C)+7 b^2 (9 A+7 C)\right )+\frac {45}{16} \left (21 a^4 B+42 a^2 b^2 B+5 b^4 B+28 a^3 b (3 A+C)+4 a b^3 (7 A+5 C)\right ) \sec (c+d x)+\frac {3}{16} \left (1098 a^3 b B+756 a b^3 B+192 a^4 C+21 b^4 (9 A+7 C)+7 a^2 b^2 (261 A+155 C)\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 b \left (261 a^2 b B+75 b^3 B+64 a^3 C+2 a b^2 (147 A+101 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d}+\frac {2 \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{315 d}+\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}+\frac {16}{945} \int \frac {-\frac {3}{16} a^2 \left (162 a b B-a^2 (315 A-123 C)+7 b^2 (9 A+7 C)\right )+\frac {3}{16} \left (1098 a^3 b B+756 a b^3 B+192 a^4 C+21 b^4 (9 A+7 C)+7 a^2 b^2 (261 A+155 C)\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{21} \left (21 a^4 B+42 a^2 b^2 B+5 b^4 B+28 a^3 b (3 A+C)+4 a b^3 (7 A+5 C)\right ) \int \sqrt {\sec (c+d x)} \, dx\\ &=\frac {2 \left (1098 a^3 b B+756 a b^3 B+192 a^4 C+21 b^4 (9 A+7 C)+7 a^2 b^2 (261 A+155 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{315 d}+\frac {2 b \left (261 a^2 b B+75 b^3 B+64 a^3 C+2 a b^2 (147 A+101 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d}+\frac {2 \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{315 d}+\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}+\frac {1}{15} \left (-60 a^3 b B-36 a b^3 B+15 a^4 (A-C)-18 a^2 b^2 (5 A+3 C)-b^4 (9 A+7 C)\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{21} \left (\left (21 a^4 B+42 a^2 b^2 B+5 b^4 B+28 a^3 b (3 A+C)+4 a b^3 (7 A+5 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 \left (21 a^4 B+42 a^2 b^2 B+5 b^4 B+28 a^3 b (3 A+C)+4 a b^3 (7 A+5 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 \left (1098 a^3 b B+756 a b^3 B+192 a^4 C+21 b^4 (9 A+7 C)+7 a^2 b^2 (261 A+155 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{315 d}+\frac {2 b \left (261 a^2 b B+75 b^3 B+64 a^3 C+2 a b^2 (147 A+101 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d}+\frac {2 \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{315 d}+\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}+\frac {1}{15} \left (\left (-60 a^3 b B-36 a b^3 B+15 a^4 (A-C)-18 a^2 b^2 (5 A+3 C)-b^4 (9 A+7 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=-\frac {2 \left (60 a^3 b B+36 a b^3 B-15 a^4 (A-C)+18 a^2 b^2 (5 A+3 C)+b^4 (9 A+7 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{15 d}+\frac {2 \left (21 a^4 B+42 a^2 b^2 B+5 b^4 B+28 a^3 b (3 A+C)+4 a b^3 (7 A+5 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 \left (1098 a^3 b B+756 a b^3 B+192 a^4 C+21 b^4 (9 A+7 C)+7 a^2 b^2 (261 A+155 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{315 d}+\frac {2 b \left (261 a^2 b B+75 b^3 B+64 a^3 C+2 a b^2 (147 A+101 C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d}+\frac {2 \left (63 A b^2+117 a b B+48 a^2 C+49 b^2 C\right ) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{315 d}+\frac {2 (9 b B+8 a C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^3 \sin (c+d x)}{63 d}+\frac {2 C \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^4 \sin (c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 7.49, size = 609, normalized size = 1.38 \begin {gather*} \frac {2 \cos ^6(c+d x) \left (\frac {2 \left (105 a^4 A-630 a^2 A b^2-63 A b^4-420 a^3 b B-252 a b^3 B-105 a^4 C-378 a^2 b^2 C-49 b^4 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}+2 \left (420 a^3 A b+140 a A b^3+105 a^4 B+210 a^2 b^2 B+25 b^4 B+140 a^3 b C+100 a b^3 C\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}\right ) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{105 d (b+a \cos (c+d x))^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {(a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac {4}{15} \left (90 a^2 A b^2+9 A b^4+60 a^3 b B+36 a b^3 B+15 a^4 C+54 a^2 b^2 C+7 b^4 C\right ) \sin (c+d x)+\frac {4}{7} \sec ^3(c+d x) \left (b^4 B \sin (c+d x)+4 a b^3 C \sin (c+d x)\right )+\frac {4}{21} \sec (c+d x) \left (28 a A b^3 \sin (c+d x)+42 a^2 b^2 B \sin (c+d x)+5 b^4 B \sin (c+d x)+28 a^3 b C \sin (c+d x)+20 a b^3 C \sin (c+d x)\right )+\frac {4}{45} \sec ^2(c+d x) \left (9 A b^4 \sin (c+d x)+36 a b^3 B \sin (c+d x)+54 a^2 b^2 C \sin (c+d x)+7 b^4 C \sin (c+d x)\right )+\frac {4}{9} b^4 C \sec ^3(c+d x) \tan (c+d x)\right )}{d (b+a \cos (c+d x))^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) \sec ^{\frac {11}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1522\) vs.
\(2(461)=922\).
time = 0.44, size = 1523, normalized size = 3.45
method | result | size |
default | \(\text {Expression too large to display}\) | \(1523\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.56, size = 525, normalized size = 1.19 \begin {gather*} -\frac {15 \, \sqrt {2} {\left (21 i \, B a^{4} + 28 i \, {\left (3 \, A + C\right )} a^{3} b + 42 i \, B a^{2} b^{2} + 4 i \, {\left (7 \, A + 5 \, C\right )} a b^{3} + 5 i \, B b^{4}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 15 \, \sqrt {2} {\left (-21 i \, B a^{4} - 28 i \, {\left (3 \, A + C\right )} a^{3} b - 42 i \, B a^{2} b^{2} - 4 i \, {\left (7 \, A + 5 \, C\right )} a b^{3} - 5 i \, B b^{4}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 21 \, \sqrt {2} {\left (-15 i \, {\left (A - C\right )} a^{4} + 60 i \, B a^{3} b + 18 i \, {\left (5 \, A + 3 \, C\right )} a^{2} b^{2} + 36 i \, B a b^{3} + i \, {\left (9 \, A + 7 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 21 \, \sqrt {2} {\left (15 i \, {\left (A - C\right )} a^{4} - 60 i \, B a^{3} b - 18 i \, {\left (5 \, A + 3 \, C\right )} a^{2} b^{2} - 36 i \, B a b^{3} - i \, {\left (9 \, A + 7 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {2 \, {\left (35 \, C b^{4} + 21 \, {\left (15 \, C a^{4} + 60 \, B a^{3} b + 18 \, {\left (5 \, A + 3 \, C\right )} a^{2} b^{2} + 36 \, B a b^{3} + {\left (9 \, A + 7 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{4} + 15 \, {\left (28 \, C a^{3} b + 42 \, B a^{2} b^{2} + 4 \, {\left (7 \, A + 5 \, C\right )} a b^{3} + 5 \, B b^{4}\right )} \cos \left (d x + c\right )^{3} + 7 \, {\left (54 \, C a^{2} b^{2} + 36 \, B a b^{3} + {\left (9 \, A + 7 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} + 45 \, {\left (4 \, C a b^{3} + B b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{315 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^4\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________